package prototypeDemo.exp1;

/**
 * @author zsh
 * @Description
 * @create 2022-05-16 19:28
 */
public class MessageBox extends Father {
    private char deCoChar;

    public MessageBox(char deCoChar){
        this.deCoChar = deCoChar;
    }

    @Override
    public void use(String s) {
        int len = s.length();
        for (int i = 0; i < len ; i++) {
            System.out.print(deCoChar);
        }
        System.out.println("");
        System.out.println(deCoChar + " " + s + " " + deCoChar);
        for (int i = 0; i < len ; i++) {
            System.out.print(deCoChar);
        }
        System.out.println("");
    }

}
